package leetcode.code040;

import java.util.List;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution040 implements IDebug {
	public abstract List<List<Integer>> combinationSum2(int[] candidates, int target);

	@Override
	public void debug1() {
		String str1 = "[10,1,2,7,6,1,5]";
		int target = 8;
		String str2 = "[[1,1,6],[1,2,5],[1,7],[2,6]]";
		this.debug(str1, target, str2);
	}

	private void debug(String str1, int target, String str2) {
		int[] candidates = HelpDebug.str2array3(str1);
		List<List<Integer>> result = this.combinationSum2(candidates, target);
		List<List<Integer>> expect = HelpDebug.str2intlist1(str2);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug2() {
		String str1 = "[2,5,2,1,2]";
		int target = 5;
		String str2 = "[[1,2,2],[5]]";
		this.debug(str1, target, str2);
	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
